class_name PlayerAirState
extends StateMachine


func _init() -> void:
	super("air")


func _on_setup() -> void:
	add_state(PlayerUpState.new())
	add_state(PlayerDownState.new())
	
	add_transition("any", MultiwayStateTransition.new(
		"air_transition",
		[
			func():\
				return 0 if owner.velocity.y < 0.0 else\
					   1
		],
		{
			[0]: "up",
			[1]: "down",
		}
	))
